<div class="containFt main create">
		<form id="orderForm" onsubmit="return false">
			<input type="hidden" name="goodscode"
				value="<%=goods['goodscode']%>" /> <input type="hidden"
				name="orderamount" id="orderamount"
				value="<%=rows[0]['min']%>" /> <input type="hidden"
				name="coupons" id="couponsInput" value="" /> <input type="hidden"
				name="slpercent" id="slpercent" value="" /> <input type="hidden"
				name="tppercent" id="tppercent" value="" />
			<div class="row title b-line">
				<label><%=goods['goodsname'] %></label>
				<div class="col">
					方向:<input type="radio" <%=direct == 's'?'':"checked"%>
						name="direct" value="b" id="type1" /><label for="type1" class="up">涨</label><input
						type="radio" <%=direct == 's'?'checked':""%> name="direct"
						value="s" id="type2" /><label for="type2" class="down">跌</label>
				</div>
			</div>
			<p class="mt1">
				实时报价：<span id="currentPrice"><%=lastPrice?lastPrice:''%></span>
			</p>
			<!-- p class="mt1">持仓数：已买0手，剩余10手</p> -->
			<table class="size-nav border-table" id="rowSelecte">
				<tr>
            <% for(var i=0;i<rows.length;i++) { %>
          		<td <%=i == 0 ? 'class="selected"' : ''%>
						data="<%=i%>"><%=rows[i].min*stepamount+'-'+ rows[i]['max'] * stepamount%></td>
          	<%}%>
          </tr>
			</table>
			<ul class="size-list clearfix" id="numberSelect">
             <%var count = 1;for(var i = rows[0]['min']; i <= rows[0]['max']; i ++) {%>
                    <li <%=i == rows[0]['min'] ?'class="selected"' :''%>><%=stepamount * i%></li>
             <% count++;}%>
         </ul>
			<div class="clearfix">
				<span class="fl" id="goodsprice"><b><%=goods['goodsprice']%></b>元</span>
			</div>
			<% if(coupons.length!=0){ %>
			<p class="couponBtnCt">
				<input value="选择赢家券" type="button" class="" id="couponBtn" />
			</p>
			<% } %>
			<div id="coupon-select-ct"></div>
			<div class="row stop">
				<label>止盈：</label>
				<div class="col">
					<table class="border-table stop">
						<tr>
							<td class="stopPercentBtn" data-step="-1" data-direct="up">-</td>
							<td id="stopCt_up">0%</td>
							<td class="stopPercentBtn" data-step="1" data-direct="up"]">+</td>
						</tr>
					</table>
				</div>
				<div>（范围：0-50%）</div>
			</div>
			<div class="row stop">
				<label>止损：</label>
				<div class="col">
					<table class="border-table stop">
						<tr>
							<td class="stopPercentBtn" data-step="-1" data-direct="down">-</td>
							<td id="stopCt_down">0%</td>
							<td class="stopPercentBtn" data-step="1" data-direct="down">+</td>
						</tr>
					</table>
				</div>
				<div>（范围：0-50%）</div>
			</div>
			<p class="tips stop-tips">投资有风险，交易需谨慎，做好止损降低风险</p>
			<p class="total-price tc" id="total-price">
				<b><%=+goods['goodsprice']+Number(goods['opencharge'])%></b>元（含手续费）
			</p>
         <input type="submit" class="long-btn <%=(+goods['opencharge']+Number(goods['goodsprice'])) > userfunds['balance'] / 100?'none':''%>"
				value="我要建仓" id="subBtn" /> 
		 <input class="long-btn <%=+goods['opencharge'] + Number(goods['goodsprice'])> (userfunds['balance'] / 100) ?'':'none'%>" type="button"
			 id="toCharge"
				onclick="<%='window.location =\'/index.php/funds/charge\''%>"
				value="余额不足,请去充值" />
         <p class="tips tc">若凌晨4:00前无操作，该订单将会被强行平仓</p>
		</form>
		<div class="dialogCt none" id="coupon-dialog">
		<div class="mask"></div>
		<div class="dialog center-middle tc">
			<p>请选择赢家券</p>
			<ul class="clearfix coupon-list">
     	    <% 
     	       for(var i=0;i<coupons.length;i++){ 
     	          coupon=coupons[i];
     	    %>
     	    <li couponid="<%=coupon['couponid']%>"
					num="<%=coupon['num']%>" facevalue="<%=coupon['facevalue']%>"><%=coupon['facevalue']%>元赢家券</li>
     	    <% }%>
     	    </ul>
			<!--  input class="long-btn" type="button" value="确定" />-->
		</div>
	</div>
</div>